package cn.tedu.sp09.feign;


import cn.tedu.sp01.pojo.Order;
import cn.tedu.web.util.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;



//根据服务id，从注册表得到主机地址
@FeignClient(name = "order-service",fallback = OrderClientFB.class)
public interface OrderClient {
    @GetMapping("/{orderId}")
    JsonResult<Order> getOrder(@PathVariable String orderId);

    @GetMapping("/")
    JsonResult<?> addOrder();

}
